/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * areariservata.java
 *
 * Created on 23-jul-2010, 12.29.46
 */

package mymall.views;
//import mymall.custom.*;

/**
 *
 * @author Fabio Franchi
 */
public class areariservata extends javax.swing.JPanel {

    private Boolean flagHelp = false;
    private index pagePanel;
    String txt = "Premi ? per accedere alla\n" +
                 "guida del centro MyMall";
    String txtHome = "Area riservata del centro MyMall\n" +
                     "Segui la procedura per inserire una nuova offerta del centro!";
    
    /** Creates new form home */
    public areariservata(index PanP) {
        pagePanel = PanP;
        initComponents();
        helpText.setText(txt);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        header = new javax.swing.JPanel();
        nav = new javax.swing.JPanel();
        homeBtn = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        informazioniBtn = new javax.swing.JButton();
        headerImage = new javax.swing.JLabel();
        sx = new javax.swing.JPanel();
        inizioLbl = new javax.swing.JLabel();
        sxImage = new javax.swing.JLabel();
        main = new javax.swing.JPanel();
        nuovaLbl = new javax.swing.JLabel();
        titoloLbl = new javax.swing.JLabel();
        titoloFld = new javax.swing.JTextField();
        hintLbl = new javax.swing.JLabel();
        nextBtn = new javax.swing.JButton();
        mainImage = new javax.swing.JLabel();
        footer = new javax.swing.JPanel();
        helpBtn = new javax.swing.JButton();
        help = new javax.swing.JPanel();
        helpText = new javax.swing.JTextArea();
        backBtn = new javax.swing.JButton();
        footerImage = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));
        setLayout(null);

        header.setBackground(new java.awt.Color(255, 255, 255));
        header.setPreferredSize(new java.awt.Dimension(1024, 211));
        header.setLayout(null);

        nav.setBackground(new java.awt.Color(192, 214, 233));
        nav.setLayout(null);

        homeBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/nav/home.png"))); // NOI18N
        homeBtn.setBorderPainted(false);
        homeBtn.setLocation(new java.awt.Point(20, 0));
        homeBtn.setMaximumSize(new java.awt.Dimension(34, 35));
        homeBtn.setMinimumSize(new java.awt.Dimension(34, 35));
        homeBtn.setPreferredSize(new java.awt.Dimension(34, 35));
        homeBtn.setSize(new java.awt.Dimension(34, 35));
        homeBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                homeBtnActionPerformed(evt);
            }
        });
        nav.add(homeBtn);
        homeBtn.setBounds(20, 0, 34, 35);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/nav/arrow.png"))); // NOI18N
        jLabel1.setSize(new java.awt.Dimension(35, 35));
        nav.add(jLabel1);
        jLabel1.setBounds(70, 0, 35, 35);

        informazioniBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/nav/areariservata_hover.png"))); // NOI18N
        informazioniBtn.setMaximumSize(new java.awt.Dimension(129, 35));
        informazioniBtn.setMinimumSize(new java.awt.Dimension(129, 35));
        informazioniBtn.setPreferredSize(new java.awt.Dimension(129, 35));
        informazioniBtn.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/nav/areariservata_hover.png"))); // NOI18N
        informazioniBtn.setSize(new java.awt.Dimension(129, 35));
        informazioniBtn.setVerifyInputWhenFocusTarget(false);
        informazioniBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                informazioniBtnActionPerformed(evt);
            }
        });
        nav.add(informazioniBtn);
        informazioniBtn.setBounds(120, 0, 129, 35);

        header.add(nav);
        nav.setBounds(22, 160, 980, 35);

        headerImage.setBackground(new java.awt.Color(255, 255, 255));
        headerImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/header.png"))); // NOI18N
        headerImage.setAlignmentX(0.5F);
        header.add(headerImage);
        headerImage.setBounds(0, 0, 1024, 211);

        add(header);
        header.setBounds(0, 0, 1024, 211);

        sx.setBackground(new java.awt.Color(255, 255, 255));
        sx.setBounds(new java.awt.Rectangle(0, 211, 282, 471));
        sx.setPreferredSize(new java.awt.Dimension(282, 471));
        sx.setLayout(null);

        inizioLbl.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/details/inizio.png"))); // NOI18N
        sx.add(inizioLbl);
        inizioLbl.setBounds(11, 10, 260, 450);

        sxImage.setBackground(new java.awt.Color(255, 255, 255));
        sxImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/sx.png"))); // NOI18N
        sxImage.setAlignmentX(0.5F);
        sx.add(sxImage);
        sxImage.setBounds(0, 0, 282, 471);

        add(sx);
        sx.setBounds(0, 211, 282, 471);

        main.setBackground(new java.awt.Color(255, 255, 255));
        main.setBounds(new java.awt.Rectangle(282, 211, 742, 471));
        main.setPreferredSize(new java.awt.Dimension(742, 471));
        main.setLayout(null);

        nuovaLbl.setFont(new java.awt.Font("Georgia", 1, 24)); // NOI18N
        nuovaLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        nuovaLbl.setText("NUOVA OFFERTA");
        main.add(nuovaLbl);
        nuovaLbl.setBounds(210, 40, 280, 40);

        titoloLbl.setFont(new java.awt.Font("Georgia", 1, 14));
        titoloLbl.setText("Titolo:");
        main.add(titoloLbl);
        titoloLbl.setBounds(100, 220, 100, 30);

        titoloFld.setFont(new java.awt.Font("Georgia", 0, 14));
        main.add(titoloFld);
        titoloFld.setBounds(210, 220, 300, 29);

        hintLbl.setFont(new java.awt.Font("Georgia", 2, 12)); // NOI18N
        hintLbl.setForeground(new java.awt.Color(100, 100, 100));
        hintLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        hintLbl.setText("Inserisci il titolo per la nuova offerta");
        main.add(hintLbl);
        hintLbl.setBounds(220, 250, 280, 40);

        nextBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/buttons/next.png"))); // NOI18N
        nextBtn.setBorderPainted(false);
        nextBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nextBtnActionPerformed(evt);
            }
        });
        main.add(nextBtn);
        nextBtn.setBounds(570, 205, 60, 60);

        mainImage.setBackground(new java.awt.Color(255, 255, 255));
        mainImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/main.png"))); // NOI18N
        mainImage.setAlignmentX(0.5F);
        mainImage.setBounds(new java.awt.Rectangle(0, 0, 742, 471));
        main.add(mainImage);
        mainImage.setBounds(0, 0, 742, 471);

        add(main);
        main.setBounds(282, 211, 742, 471);

        footer.setBackground(new java.awt.Color(255, 255, 255));
        footer.setBounds(new java.awt.Rectangle(0, 682, 1024, 86));
        footer.setPreferredSize(new java.awt.Dimension(1024, 86));
        footer.setLayout(null);

        helpBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/buttons/help.png"))); // NOI18N
        helpBtn.setBorder(null);
        helpBtn.setBounds(new java.awt.Rectangle(21, 13, 60, 60));
        helpBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                helpBtnActionPerformed(evt);
            }
        });
        footer.add(helpBtn);
        helpBtn.setBounds(21, 13, 60, 60);

        help.setBackground(new java.awt.Color(255, 255, 255));
        help.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
        help.setPreferredSize(new java.awt.Dimension(600, 60));
        help.setLayout(null);

        helpText.setColumns(50);
        helpText.setEditable(false);
        helpText.setFont(new java.awt.Font("Georgia", 1, 15));
        helpText.setForeground(new java.awt.Color(55, 55, 55));
        helpText.setRows(1);
        helpText.setTabSize(6);
        helpText.setWrapStyleWord(true);
        helpText.setAutoscrolls(false);
        helpText.setBorder(null);
        helpText.setVerifyInputWhenFocusTarget(false);
        help.add(helpText);
        helpText.setBounds(45, 10, 240, 40);

        footer.add(help);
        help.setBounds(51, 13, 300, 60);

        backBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/buttons/back_new.png"))); // NOI18N
        backBtn.setBorderPainted(false);
        backBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backBtnActionPerformed(evt);
            }
        });
        footer.add(backBtn);
        backBtn.setBounds(7633, 13, 240, 60);

        footerImage.setBackground(new java.awt.Color(255, 255, 255));
        footerImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mymall/img/footer.png"))); // NOI18N
        footerImage.setAlignmentX(0.5F);
        footerImage.setBounds(new java.awt.Rectangle(0, 0, 1024, 86));
        footer.add(footerImage);
        footerImage.setBounds(0, 0, 1024, 86);

        add(footer);
        footer.setBounds(0, 682, 1024, 86);
    }// </editor-fold>//GEN-END:initComponents

    private void helpBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_helpBtnActionPerformed
        if (flagHelp == false){
            help.setSize(600,60);
            helpText.setSize(540,40);
            helpText.setText(txtHome);
            flagHelp = true;
            }
        else {
            help.setSize(300,60);
            helpText.setSize(240,40);
            helpText.setText(txt);
            flagHelp = false;
            }
    }//GEN-LAST:event_helpBtnActionPerformed

    private void homeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_homeBtnActionPerformed
        pagePanel.activeView("home");
    }//GEN-LAST:event_homeBtnActionPerformed

    private void backBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backBtnActionPerformed

        pagePanel.activeView("home");
    }//GEN-LAST:event_backBtnActionPerformed

    private void informazioniBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_informazioniBtnActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_informazioniBtnActionPerformed

    private void nextBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextBtnActionPerformed

        pagePanel.setTitles(titoloFld.getText());
        pagePanel.activeView("areariservata_descrizione");
}//GEN-LAST:event_nextBtnActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton backBtn;
    private javax.swing.JPanel footer;
    private javax.swing.JLabel footerImage;
    private javax.swing.JPanel header;
    private javax.swing.JLabel headerImage;
    private javax.swing.JPanel help;
    private javax.swing.JButton helpBtn;
    private javax.swing.JTextArea helpText;
    private javax.swing.JLabel hintLbl;
    private javax.swing.JButton homeBtn;
    private javax.swing.JButton informazioniBtn;
    private javax.swing.JLabel inizioLbl;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel main;
    private javax.swing.JLabel mainImage;
    private javax.swing.JPanel nav;
    private javax.swing.JButton nextBtn;
    private javax.swing.JLabel nuovaLbl;
    private javax.swing.JPanel sx;
    private javax.swing.JLabel sxImage;
    private javax.swing.JTextField titoloFld;
    private javax.swing.JLabel titoloLbl;
    // End of variables declaration//GEN-END:variables

}
